<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<head>
    <script type="text/javascript" src="http://www.imooc.com/data/jquery-1.8.2.min.js"></script>        
</head>
<body>
    <div id="content">
        <ul>
            <li>语文</li>
            <li>数学</li>
            <li>英语</li>
            <li>物理</li>
            <li>化学</li>
            <li>生物</li>
        </ul>
    </div>
    <script type="text/javascript">
       (function(){
           $.fn.extend({
               
               "ulFocue":function(){
                   
                   $(this).find("li").each(function(){
                       
                       $(this).mouseover(function(){
                           
                           $(this).css("background-color","#ccc");
                       }).mouseout(function(){
                           
                            $(this).css("background-color", "#fff");  
                       });
                   })
                   return $(this);
               }
           });
        })(jQuery);

       $(function(){
           $("ul").ulFocue();
       });
    </script>
</body>
</html>